package com.qi.service.impl;

import com.qi.commom.User;
import com.qi.mapper.LoginMapper;
import com.qi.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private LoginMapper loginMapper;

    /**
     * 登录方法
     * @param user
     * @return
     */
    @Override
    public User loginUser(User user) {
        return loginMapper.loginUser(user);
    }

    /**
     * 注册新账号
     * @param user
     */
    @Override
    public void insertUser(User user) {
        loginMapper.insertUser(user);
    }
}
